<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/styleold.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript" src="./script/base.js"></script>
    <script type="text/javascript" src="./script/jquery.min.js"></script>
</head>

<body>
    <header class="aui-bar aui-bar-nav">
        <div class="aui-title">更多</div>
    </header>
    <div class="aui-bar-nav-d"></div>

    <ul class="more-t">
        <li tapmode onclick="more_ques()">
            <img src="image/more-1.png">
            <p>常见问题</p>
        </li>
        <li tapmode onclick="about()">
            <img src="image/more-2.png">
            <p>关于我们</p>
        </li>
        <li tapmode onclick="feedback()">
            <img src="image/more-3.png">
            <p>意见反馈</p>
        </li>
        <li tapmode onclick="calculator()">
            <img src="image/more-4.png">
            <p>收益计算</p>
        </li>
    </ul>
    <ul class="more-m aui-list aui-list-in">
        <li class="aui-list-item"  tapmode onclick="news(5,'金可贷公告')">
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-title"><img src="image/more-5.png">金可贷公告</div>
                <div class="aui-list-item-right">
                    <!-- <div class="aui-badge"></div> -->
                </div>
            </div>
        </li>
        <li class="aui-list-item"  tapmode onclick="news(32,'资讯中心')">
            <div class="aui-list-item-inner aui-list-item-arrow">
                <div class="aui-list-item-title"><img src="image/more-6.png">资讯中心</div>
                <div class="aui-list-item-right">
                    <!-- <div class="aui-badge"></div> -->
    </ul>


    <div class="more-d">
        <img src="image/ewm.jpg">
        <p>推荐好友扫描上方二维码，可直接下载金可贷APP</p>
    </div>
    <!-- <div class="more-list-d" onclick="logout();" id="btnForLogin">退出登录</div> -->

</body>
<script type="text/javascript">

    apiready = function(){
        btnForLogin();



    }

    // 如若已登录,则显示退出登录按钮
    function btnForLogin(){
        // var userid = $api.getStorage('userid');
        // if (userid) {
        //     var btnForLogin = $api.byId('btnForLogin');
        //     // $api.removeAttr(btnForLogin, 'style');
        //     btnForLogin.style.display = 'block';
        //
        // }else{
        //     var btnForLogin = $api.byId('btnForLogin');
        //     btnForLogin.style.display = 'none';
        // }
    }

    // 退出登录
    function logout(){

        api.confirm({
            title: '提示',
            msg: '是否登出?',
            buttons: ['确定', '取消']
        }, function(ret, err){
            if( ret ){
                if (ret.buttonIndex == 1) {
                   $api.setStorage('userid', '');
                   $api.setStorage('mobile', '');
                 // 提示退出成功
                 api.toast({
                   msg: '退出成功!',
                   duration: 1500,
                   location: 'middle'
               });
                //  api.setFrameGroupIndex({
                //     name: 'nav',
                //     index: 2,
                //     reload: true,
                // });
                 var setSele = 'randomSwitchBtn(2);';
                 api.execScript({
                    name: 'root',
                    script: setSele,
                });
             }
         }else{
         }
     });
    }

    function more_ques(){
        var delay = 0;
        if (api.systemType != 'ios') {
            // delay = 300;
        }
        api.openWin({
            name: 'more_ques',
            url: './more_ques.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function about() {
        var delay = 0;
        if (api.systemType != 'ios') {
            // delay = 300;
        }
        api.openWin({
            name: 'about',
            url: './about.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
            progress: {
                type: "page"
            }
        });
    };

    function news(n, title) {
        var delay = 0;
        if (api.systemType != 'ios') {
        }
        api.openWin({
            name: 'news',
            url: './news.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
            pageParam: {
                id: n,
                title: title
            }
        });
    }

    function calculator() {
        var delay = 0;
        if (api.systemType != 'ios') {
            // delay = 300;
        }
        api.openWin({
            name: 'calculator',
            url: './calculator.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
            progress: {
                type: "page"
            }
        });
    };

    function feedback() {
        var delay = 0;
        if (api.systemType != 'ios') {
            // delay = 300;
        }
        api.openWin({
            name: 'feedback',
            url: './feedback.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
            progress: {
                type: "page"
            }
        });
    };



    function closeWin() {
        api.closeWin({});
    }
</script>

</html>
